package graphics;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.BoxLayout;
import javax.swing.GroupLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.LayoutStyle;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class EOrderJFrame extends javax.swing.JFrame {
	private JPanel principaljPanel;
	private JLabel logojLabel;
	private JPanel buttonsjPanel1;
	private JButton nuovoProdottojButton;
	private JButton exitjButton;
	private JButton visualizzaProdottijButton;
	private JButton visualizzaClientijButton;
	private JButton visualizzaOrdinijButton;
	private JPanel buttonsjPanel2;
	private JButton nuovoClientejButton;
	private JButton nuovoOrdinejButton;

	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
		} catch(Exception e) {
			e.printStackTrace();
		}
	}


	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				EOrderJFrame inst = new EOrderJFrame();
				inst.setLocationRelativeTo(null);
				inst.setTitle("eOrder - Software per la gestione degli ordini sviluppato da Marco Cozza");
				inst.setVisible(true);
			}
		});
	}
	
	public EOrderJFrame() {
		super();
		
		initGUI();
	}
	
	private void initGUI() {
		try {
			BoxLayout thisLayout = new BoxLayout(getContentPane(), javax.swing.BoxLayout.Y_AXIS);
			getContentPane().setLayout(thisLayout);
			this.setTitle("Seleziona Cliente | eOrder - Software per la gestione degli ordini sviluppato da Marco Cozza");
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				principaljPanel = new JPanel();
				getContentPane().add(principaljPanel);
				principaljPanel.setPreferredSize(new java.awt.Dimension(873, 565));
				principaljPanel.setSize(801, 600);
				{
					logojLabel = new JLabel();
					principaljPanel.add(logojLabel);
					logojLabel.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/logo-eorder.png")));
				}
				{
					buttonsjPanel1 = new JPanel();
					principaljPanel.add(buttonsjPanel1);
					buttonsjPanel1.setPreferredSize(new java.awt.Dimension(808, 156));
					{
						nuovoOrdinejButton = new JButton();
						buttonsjPanel1.add(nuovoOrdinejButton);
						nuovoOrdinejButton.setText("Nuovo Ordine (F1)");
						nuovoOrdinejButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/shopping.png")));
						nuovoOrdinejButton.setFont(new java.awt.Font("SansSerif",1,12));
						nuovoOrdinejButton.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent arg0) {
								// TODO Auto-generated method stub
								JFrame frame = new JFrame();
								frame.getContentPane().add(new OrdineJPanel());
								frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
								frame.pack();
								frame.setLocationRelativeTo(null);
								frame.setTitle("Nuovo Ordine | eOrder - Software per la gestione degli ordini sviluppato da Marco Cozza");
								frame.setVisible(true);
							}
						});
					}
					{
						nuovoClientejButton = new JButton();
						buttonsjPanel1.add(nuovoClientejButton);
						nuovoClientejButton.setText("Nuovo Cliente (F2)");
						nuovoClientejButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/man-brown.png")));
						nuovoClientejButton.setFont(new java.awt.Font("SansSerif",1,12));
						nuovoClientejButton.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent e) {
								// TODO Auto-generated method stub
								JFrame frame = new JFrame();
								frame.getContentPane().add(new NuovoClienteJPanel());
								frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
								frame.pack();
								frame.setLocationRelativeTo(null);
								frame.setTitle("Nuovo Cliente | eOrder - Software per la gestione degli ordini sviluppato da Marco Cozza");
								frame.setVisible(true);
							}
						});
					}
					{
						nuovoProdottojButton = new JButton();
						buttonsjPanel1.add(nuovoProdottojButton);
						nuovoProdottojButton.setText("Nuovo Prodotto (F3)");
						nuovoProdottojButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/download-box-icon.png")));
						nuovoProdottojButton.setFont(new java.awt.Font("SansSerif",1,12));
					}
				}
				{
					buttonsjPanel2 = new JPanel();
					principaljPanel.add(buttonsjPanel2);
					buttonsjPanel2.setPreferredSize(new java.awt.Dimension(858, 150));
					buttonsjPanel2.setSize(698, 600);
					{
						visualizzaOrdinijButton = new JButton();
						buttonsjPanel2.add(visualizzaOrdinijButton);
						visualizzaOrdinijButton.setText("Visual. Ordini (F4)");
						visualizzaOrdinijButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/clipboard-icon.png")));
						visualizzaOrdinijButton.setFont(new java.awt.Font("SansSerif",1,12));
						visualizzaOrdinijButton.setPreferredSize(new java.awt.Dimension(260, 140));
					}
					{
						visualizzaClientijButton = new JButton();
						buttonsjPanel2.add(visualizzaClientijButton);
						visualizzaClientijButton.setText("Visual. Clienti (F5)");
						visualizzaClientijButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/contacts-icon.png")));
						visualizzaClientijButton.setFont(new java.awt.Font("SansSerif",1,12));
					}
					{
						visualizzaProdottijButton = new JButton();
						buttonsjPanel2.add(visualizzaProdottijButton);
						visualizzaProdottijButton.setText("Visual. Prodotti (F6)");
						visualizzaProdottijButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/archive-icon.png")));
						visualizzaProdottijButton.setFont(new java.awt.Font("SansSerif",1,12));
					}
				}
				{
					exitjButton = new JButton();
					principaljPanel.add(exitjButton);
					exitjButton.setText("Esci dal programma");
					exitjButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/exit.png")));
					exitjButton.setFont(new java.awt.Font("SansSerif",1,12));
				}
			}
			pack();
			this.setSize(869, 649);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

}
